<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Pet list</title>
</head>
<body>
<form action="/pet/list" method="post">
    <label>
        Name:
    </label>
    <input type="text" name="name">
    <label>
        Major:
    </label>
    <input type="text" name="petcategory">
    <input type="submit" value="Search">
</form>
<table border="1">
    <tr>
        <td>Id</td>
        <td>Name</td>
        <td>petcategory</td>
        <td>Action</td>
    </tr>
    <tr th:each="pet:${petList}">
        <td th:text="${pet.id}"></td>
        <td th:text="${pet.name}"></td>
        <td th:text="${pet.petcategory}"></td>
        <td>
            <a th:href="@{/pet/delete/{id}(id=${pet.id})}">Delete</a>
            <a th:href="@{/pet/update/{id}(id=${pet.id})}">Update</a>
        </td>
    </tr>
</table>
<div>
    <a href="/pet/create">Create</a>
</div>
</body>
</html>